package com.intelligent.system.common.sse;

import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class SseMessage {
    private String type;        // 消息类型
    private Object data;        // 消息数据
    private Long timestamp;     // 时间戳
    private String clientId;    // 客户端ID

    public SseMessage(String type, Object data) {
        this.type = type;
        this.data = data;
        this.timestamp = System.currentTimeMillis();
    }

    public SseMessage(String type, Object data, String clientId) {
        this.type = type;
        this.data = data;
        this.timestamp = System.currentTimeMillis();
        this.clientId = clientId;
    }
} 